#pragma once

#include "util.h"
#include <iostream>
#include <fstream>
using namespace std;
/**
* Support class to write text files.
* @author Koen Samyn
*/
class TextWriter
{
public:
	/**
	* Creates a new TextWriter object.
	* @param filename the filename to write to.
	*/
	TextWriter(tstring filename);
	/**
	* Destroys the TextWriter object.
	*/
	virtual ~TextWriter(void);
	/**
	* Opens the text file for writing.
	*/
	void Open();
	void Close();
	void WriteString(tstring& value);
	void WriteEndl();
	void WriteFloat(float value);
	void WriteInt(int value);
protected:
	tofstream m_Output;

private:
	/**
	* the filename to write to.
	*/
	tstring m_FileName;
	
	

	// -------------------------
	// Disabling default copy constructor and default assignment operator.
	// If you get a linker error from one of these functions, your class is internally trying to use them. This is
	// an error in your class, these declarations are deliberately made without implementation because they should never be used.
	// -------------------------

	TextWriter(const TextWriter& t);
	TextWriter operator=(const TextWriter& t);
};
